fix(drogon): per-request JSON total computation + remove compression test#150
fix(drogon): per-request JSON total computation + remove compression test#150BennyFranciscus wants to merge 3 commits intoMDA2AV:mainfrom
Conversation
Drogon's setContentTypeCode(CT_APPLICATION_JSON) appends
'; charset=utf-8' which fails the validate Content-Type check.
Use addHeader("Content-Type", "application/json") instead.
|
Fixed the JSON Content-Type validation failure — drogon's The remaining 4 failures (H2 protocol negotiation, static-h2 Content-Type for css/js/json) are pre-existing issues in the drogon entry, not related to this PR's changes. |
…t-Type addHeader appends a second Content-Type header instead of replacing the default text/html one. setContentTypeString properly replaces the content type, fixing JSON and static file Content-Type validation.
|
Found the root cause — This should fix the JSON Content-Type validation failure and the static-h2 Content-Type failures for css/js/json files. The remaining H2 protocol negotiation failure is still a pre-existing drogon issue (responds with HTTP/1.1 on the TLS port). |
|
CI confirms the The only remaining failure is the pre-existing H2 protocol negotiation issue ( All JSON, static-h2 Content-Type, baseline, upload, and noisy tests pass cleanly. |
Addresses #64 and #65.
Changes:
Per-request total in /json — the
totalfield was pre-computed at startup inloadDataset(). Now computed per-request in the JSON handler as required by the test profile spec.Remove compression from meta.json — drogon uses
app().enableGzip(true)which defaults to zlib level 6 with no configuration option. The compression test docs explicitly exclude drogon: "Frameworks excluded due to non-configurable compression level: actix, drogon, Spring Boot (Tomcat)."Compression handler code is left in place in case drogon adds level configuration in the future.